﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SCRUM.Core.DataProviders;
using SCRUM.Core.BusinessObjects;

namespace SCRUM.Core.DAO
{
    /// <summary>
    /// Static access object for handling Daily scrum 
    /// </summary>
    public static class DaoDailyScrum
    {
        /// <summary>
        /// Returns all deatils of daily scrum meetings for user
        /// </summary>
        /// <param name="user">Specific user</param>
        /// <returns>List of daily scrum details</returns>
        public static List<DailyScrum> GetAlldailyScrumDetails(User user)
        {
            return ProviderFactory.Provider.GetAlldailyScrumDetails(user);
        }

        /// <summary>
        /// Creates new DailyScrum detail
        /// </summary>
        /// <param name="ds">DailyScrum to create</param>
        /// <returns>Created DailyScrum with ID set</returns>
        public static DailyScrum CreateNewDailyScrumDetail(DailyScrum ds)
        {
            return ProviderFactory.Provider.CreateNewDailyScrumDetail(ds);
        }

        /// <summary>
        /// Updates DailyScrum
        /// </summary>
        /// <param name="ds">Daily scrum to update</param>
        public static void UpdateDailyScrum(DailyScrum ds)
        {
            ProviderFactory.Provider.UpdateDailyScrum(ds);
        }

        /// <summary>
        /// Deletes daily scrum detail entry
        /// </summary>
        /// <param name="dsID">ID of the detail</param>
        public static void DeleteDailyScrum(int dsID)
        {
            ProviderFactory.Provider.DeleteDailyScrum(dsID);
        }
    }
}
